import React, { Component } from "react";

export default class App extends Component {
  state = {
    xuanxiang: "林杨",
  };
  xuan = (e) => {
    this.setState({
      xuanxiang: e.target.value,
    });
  };
  render() {
    return (
      <div>
        <select name="" id="" value={this.state.xuanxiang} onChange={this.xuan}>
          <option value="林杨">林杨</option>
          <option value="杨洋">杨洋</option>
          <option value="昊辰">昊辰</option>
        </select>
      </div>
    );
  }
}
